<div class="page-header">
    <h1>
        Profile
        <small>
            <i class="icon-double-angle-right"></i>
            Edit Bank Account
        </small>
    </h1>
</div>

<?php
if ($this->msg) {
    ?>
    <div class="alert alert-danger">
        <button type="button" class="close" data-dismiss="alert">
            <i class="icon-remove"></i>
        </button>

        <strong>
            <i class="icon-remove"></i>
            Error
        </strong>

        <?php echo $this->msg; ?>
        <br />
    </div>
    <?php
}
    ?>

    <div class="row">
        <div class="col-xs-11">
            <form id="formAdd" class="form-horizontal" role="form" action="" method="post">
                
                <div class="form-group">
                    <label class="col-sm-2 control-label no-padding-right" for="bank_id"> Bank Name </label>

                    <div class="col-sm-9">
                            <input type="hidden" id="account_id" name="account_id" value="<?php if (isset($this->dataAcc['account_id'])) { echo $this->dataAcc['account_id']; } ?>"/>
                            <select class="width-30 chosen-select" id="bank_id" name="bank_id" required>
                                <option value=""></option>
                                <?php
                                while ($this->banks->next()) {
                                    $bank = $this->banks->current();

                                    $selected = ($this->dataAcc['bank_id'] == $bank['bank_id']) ? 'selected' : '';

                                    echo '<option value="' . $bank['bank_id'] . '" '.$selected.'>' . $bank['bank_name'] . '</option>';
                                }
                                ?>
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label no-padding-right" for="bank_acc_name">Bank Account Name </label>
                    <div class="col-sm-9">
                        <input type="text" id="bank_acc_name" name="bank_acc_name" placeholder="Bank Account Name" class="col-xs-10 col-sm-5" value="<?php if (isset( $this->dataAcc['bank_acc_name'] )) { echo $this->dataAcc['bank_acc_name'];} ?>" required />
                </div>

            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label no-padding-right" for="bank_acc_no"> Bank Account Number </label>

                <div class="col-sm-9">
                    <input type="text" id="bank_acc_no" name="bank_acc_no" placeholder="Bank Account Number" class="col-xs-10 col-sm-5" value="<?php if (isset( $this->dataAcc['bank_acc_no'] )) { echo $this->dataAcc['bank_acc_no'];} ?>" required />
                </div>
            </div>
            <!--div class="form-group">
                <label class="col-sm-2 control-label no-padding-right" for="name"> City of Bank </label>

                <div class="col-sm-9">
                    <input type="text" id="bank_city_name" name="bank_city_name" placeholder="City of Bank" class="col-xs-10 col-sm-5" value="<?php if (isset($this->dataAcc['bank_city_name'])) { echo $this->dataAcc['bank_city_name']; } ?>" required />
                </div>
            </div-->
            
            <div class="clearfix form-actions">
                <div class="col-md-offset-3 col-md-9">
                    <button class="btn btn-success" type="submit">
                        <i class="icon-ok bigger-110"></i>
                        Submit
                    </button>

                    &nbsp; &nbsp; &nbsp;
                    <button class="btn" type="reset">
                        <i class="icon-undo bigger-110"></i>
                        Reset
                    </button>
                </div>
            </div>
        </form>
    </div>
</div>
